<template>
	<view class="dynamic_item" :class="{black: black}">
		<view class="content" :class="{active: showAll == 0}">盛夏又缝618盛夏又缝618盛夏又缝618盛夏又缝618盛夏又缝618盛夏又缝618盛夏又缝618盛夏又缝618盛夏又缝618盛夏又缝618</view>
		<view @click="showAll = !showAll" class="show_more">{{ showAll ? '收起' : '全文' }}</view>
		<view class="img_box">
			<image src="" mode="aspectFill"></image>
			<image src="" mode="aspectFill"></image>
			<image src="" mode="aspectFill"></image>
		</view>
		<view class="time_copy_share_box">
			<text class="time">2019-04-12</text>
			<view class="copy_share_box">
				<text>复制文字</text>
				<view @click="onShare">分享</view>
			</view>
		</view>
	</view>
</template>

<script>
export default {
	props: {
		black: {
			type: Boolean,
			default() {
				return false;
			}
		}
	},
	data() {
		return {
			showAll: false
		};
	},
	methods:{
		onShare(){
			this.$emit("share", {});
		}
	}
};
</script>

<style lang="scss" scoped>
@import '@/style/mixin.scss';
.dynamic_item {
	margin-bottom: 20rpx;
	background-color: #fff;
	padding: 32rpx;
	&.black {
		background: #201b21;
		border-bottom: 20rpx solid #2b262c;
		margin-bottom: 0;
		.content {
			color: rgba(255,255,255,0.6);
		}
		.time_copy_share_box .copy_share_box view {
			color: #ffffff;
			&::before {
				@include bis('../../static/icon/shortVideo/ic_dynamic_share_white.png');
			}
		}
	}
	.content {
		font-size: 28rpx;
		line-height: 42rpx;
		color: #333333;
		&.active{
			overflow: hidden;
			-webkit-line-clamp: 2;
			text-overflow: ellipsis;
			display: -webkit-box;
			-webkit-box-orient: vertical;
		}
	}
	.show_more {
		font-size: 24rpx;
		margin-top: 26rpx;
		color: #ff3682;
	}
	.img_box {
		display: flex;
		justify-content: space-between;
		margin-top: 22rpx;
		image {
			width: 220rpx;
			height: 220rpx;
			background-color: #ffc0a2;
			border-radius: 20rpx;
		}
	}
	.time_copy_share_box {
		margin-top: 26rpx;
		display: flex;
		justify-content: space-between;
		align-items: center;
		.time {
			font-size: 24rpx;
			color: #999999;
		}
		.copy_share_box {
			display: flex;
			align-items: center;
			text {
				font-size: 24rpx;
				color: #ff3682;
				margin-right: 60rpx;
			}
			view {
				font-size: 24rpx;
				color: #333333;
				display: flex;
				align-items: center;
				&::before {
					margin-right: 10rpx;
					content: '';
					@include bis('../../static/icon/shortVideo/ic_dynamic_share.png');
					width: 24rpx;
					height: 24rpx;
				}
			}
		}
	}
}
</style>
